package com.pureut.storage.controller;

import com.pureut.storage.dto.InventoryInquiryDto;
import com.pureut.storage.dto.MaterialFinishedDto;
import com.pureut.storage.dto.MaterialRawDetailDto;
import com.pureut.storage.service.InventoryInquiryService;
import com.pureut.storage.vo.InventoryInquiryVo;
import com.sale.common.core.web.controller.BaseController;
import com.sale.common.mybatis.core.page.PageQuery;
import com.sale.common.mybatis.core.page.TableDataInfo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author: YSL
 * @Date: 2023/7/20 15:23
 * @Desc: 库存信息
 */
@RestController
@RequestMapping("/inventoryInquiry")
public class InventoryInquiryController extends BaseController {

    @Resource
    private InventoryInquiryService inventoryInquiryService;


    /**
     * 库存汇总
     *
     * @param inventoryInquiryVo
     * @return
     */
    @GetMapping("/selectInventoryInquiryList")
    public TableDataInfo<InventoryInquiryDto> selectInventoryInquiryList(InventoryInquiryVo inventoryInquiryVo, PageQuery pageQuery) throws Exception {
        return inventoryInquiryService.selectInventoryInquiryList(inventoryInquiryVo, pageQuery);
    }

    /**
     * 原料明细
     *
     * @param inventoryInquiryVo
     * @return
     */
    @GetMapping("/selectMaterialRawDetail")
    public TableDataInfo<MaterialRawDetailDto> selectMaterialRawDetail(InventoryInquiryVo inventoryInquiryVo, PageQuery pageQuery) throws Exception {
        return inventoryInquiryService.selectMaterialRawDetail(inventoryInquiryVo, pageQuery);
    }

    /**
     * 成品明细
     *
     * @param inventoryInquiryVo
     * @return
     */
    @GetMapping("/selectMaterialFinishedDetail")
    public TableDataInfo<MaterialFinishedDto> selectMaterialFinishedDetail(InventoryInquiryVo inventoryInquiryVo, PageQuery pageQuery) throws Exception {
        return inventoryInquiryService.selectMaterialFinishedDetail(inventoryInquiryVo, pageQuery);
    }
}
